widget: Remove useless NULL check
authorTimm Bäder <mail@baedert.org>
Tue, 3 May 2016 15:49:20 +0000 (17:49 +0200)
committerTimm Bäder <mail@baedert.org>
Tue, 3 May 2016 16:21:33 +0000 (18:21 +0200)
We are checking for allocation != NULL at the beginning of the function
already. This also means that the allocation parameter is not nullable.

gtk/gtkwidget.c

index 4e266574f2c5b475296a1173fc6a30c9d7be3ec2..0be00ed663a87108d5ee52b1573ded532cfc690d 100644 (file)
@@ -15596,7 +15596,7 @@ _gtk_widget_set_simple_clip (GtkWidget     *widget,
 /**
  * gtk_widget_get_allocated_size:
  * @widget: a #GtkWidget
- * @allocation: (out) (allow-none): a pointer to a #GtkAllocation to copy to
+ * @allocation: (out): a pointer to a #GtkAllocation to copy to
  * @baseline: (out) (allow-none): a pointer to an integer to copy to
  *
  * Retrieves the widget’s allocated size.
@@ -15623,8 +15623,8 @@ gtk_widget_get_allocated_size (GtkWidget     *widget,
 
   priv = widget->priv;
 
-  if (allocation)
-    *allocation = priv->allocated_size;
+  *allocation = priv->allocated_size;
+
   if (baseline)
     *baseline = priv->allocated_size_baseline;
 }